/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * Project Name: lmrp-android app
 * Create Time: 16-2-16 下午6:31
 */

package com.lenovo.mso2o.rest;

import com.lenovo.framework.entity.Res;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Streaming;

/**
 * Created by hippo on 9/29/15.
 */
public interface MediaAPI {
    @POST("tickets/{ticketid}/attachments/{attachmentid}")
    @Multipart
    Call<Res> uploadAttachmentAsync(@Part("file\"; filename=\"file.bin\" ") RequestBody file, @Path("attachmentid") String lazyId, @Path("ticketid") String ticketid);

    @GET("{end}")
    @Headers({"Content-Type:*/*"})
    @Streaming
    Call<ResponseBody> getFile(@Path("end") String end);

}
